package com.youlu.campus.web.order.controller;

import com.youlu.campus.entity.VO.req.OrderPayCompensationVO;
import com.youlu.campus.web.order.service.OrderService;
import com.yuelin.infrastructure.quantum.common.QResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderPayController {

    @Autowired
   private OrderService orderService;

    @PostMapping("/public/order/pay/compensation")
    public QResult orderPay(@RequestBody OrderPayCompensationVO orderPayCompensation) {
        orderService.orderPayCompensation(orderPayCompensation);
        return QResult.success(null);
    }

    @GetMapping("/public/item/stock/init")
    public QResult initItemStock(String activityId){
        orderService.initStock(activityId);
        return QResult.success(null);
    }



}
